﻿using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Activation;
using Acaweb.Common;
using Acaweb.Model.Entities;
using Components = Acaweb.Componentes.Contracts;

namespace Acaweb.Servicios.Services
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class PensumService : Contracts.IPensumService
    {
        Components.IPensumService _PensumComponent = AppCtx.Resolve<Components.IPensumService>();

        public Pensum GetById(Acaweb.Model.Entities.DatosCompuestos.PensumPk Id)
        {
            return _PensumComponent.GetById(Id);
        }

        public List<Pensum> GetByPlanEstudio(int CodigoPlan)
        {
            return _PensumComponent.GetByPlanEstudio(CodigoPlan).ToList();
        }

        public List<Pensum> GetCurrentPensum(int Estudiante)
        {
            return _PensumComponent.GetCurrentPensum(AuthenticationService.GetCurrent().ToInt()).ToList();
        }
    }
}
